#include <image.hpp>
#include <operator.hpp>

#include <iostream>
using namespace std;

int main(int argc, char **argv)
{

    gflLibraryInit();
    try
    {

        Image<double> test1("landscape.jpg");
        Image<int>      res(RGB_SPACE);

        Convert(test1,res);
        res.save("pieces2","png");

    }
    catch(Exception &e)
    {
        cout<<"Erreur!"<<endl;
        cout<<e.what()<<endl;
        cout<<e.getFile()<<", func: "<<e.getFunction()<<", line: "<<e.getLine()<<endl;
    }

    cout<<"fini"<<endl;
    Memory::killInstance();
    gflLibraryExit();
    return 0;
}
